#!/bin/bash
flags=-umc
/usr/sbin/tmpwatch "$flags"  -x /tmp/cvmfs -x /tmp/.X11-unix -x /tmp/.XIM-unix \
        -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 240 /tmp
/usr/sbin/tmpwatch "$flags" 720 /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
    if [ -d "$d" ]; then
        /usr/sbin/tmpwatch "$flags" -f 720 "$d"
    fi
done
#scratchfs
surfix=`date +%d-%m-%y`
st=`date`
echo "Starting at: $st" >>/scratchfs/cc/log/tmpwatchlog/out.$surfix
echo "File list:" >>/scratchfs/cc/log/tmpwatchlog/out.$surfix
#/usr/sbin/tmpwatch   -umc -v -d -t 336 --exclude="/scratchfs/cc/wanglu /scratchfs/ybj/worktmp /scratchfs/nanobio /scratchfs/liyanrong" /scratchfs >/scratchfs/cc/log/tmpwatchlog/rmfile
more /scratchfs/cc/log/tmpwatchlog/rmfile |grep removing|awk '{system ("stat "$3)}'>>/scratchfs/cc/log/tmpwatchlog/out.$surfix
#/usr/sbin/tmpwatch   -umc -v -d 336 --exclude="/scratchfs/cc/wanglu /scratchfs/ybj/worktmp /scratchfs/nanobio /scratchfs/liyanrong" /scratchfs 1>>/scratchfs/cc/log/tmpwatchlog/out.$surfix 2>>/scratchfs/cc/log/tmpwatchlog/err.$surfix
et=`date`
echo "Ending at:$et" >>/scratchfs/cc/log/tmpwatchlog/out.$surfix
#ybjgfs
surfix1=`date +%d-%m-%y`
st1=`date`
echo "Starting at: $st1" >>/scratchfs/cc/log/ybjtmpwatch/ybjgfs.$surfix1
echo "File list:" >>/scratchfs/cc/log/ybjtmpwatch/ybjgfs.$surfix1
/usr/sbin/tmpwatch  -umc -v -d -t 1464 /ybjgfs/argo/temp >/scratchfs/cc/log/ybjtmpwatch/ybjgfsrmfile
more /scratchfs/cc/log/tmpwatchlog/ybjgfsrmfile |grep removing|awk '{system ("stat "$3)}'>>/scratchfs/cc/log/ybjtmpwatch/ybjgfs.$surfix1
/usr/sbin/tmpwatch  -umc -v -d 1464 /ybjgfs/argo/temp 1>>/scratchfs/cc/log/ybjtmpwatch/ybjgfs.$surfix1 2>>/scratchfs/cc/log/ybjtmpwatch/err.$surfix1
echo "File list:" >>/scratchfs/cc/log/ybjtmpwatch/ybjgfs.$surfix1
/usr/sbin/tmpwatch  -umc -v -d -t 1464 /ybjgfs/lhaaso/temp >/scratchfs/cc/log/ybjtmpwatch/ybjgfsrmfile
more /scratchfs/cc/log/tmpwatchlog/ybjgfsrmfile |grep removing|awk '{system ("stat "$3)}'>>/scratchfs/cc/log/ybjtmpwatch/ybjgfs.$surfix1
/usr/sbin/tmpwatch  -umc -v -d 1464 /ybjgfs/lhaaso/temp 1>>/scratchfs/cc/log/ybjtmpwatch/ybjgfs.$surfix1 2>>/scratchfs/cc/log/ybjtmpwatch/err.$surfix1
et=`date`
echo "Ending at:$et" >>/scratchfs/cc/log/ybjtmpwatch/ybjgfs.$surfix1
#cefs
#surfix=`date +%d-%m-%y`
#st=`date`
#echo "Starting at: $st" >>/scratchfs/cc/log/cetmpwatch/out.$surfix
#echo "File list:" >>/scratchfs/cc/log/cetmpwatch/out.$surfix
#/usr/sbin/tmpwatch   -umc -v -d -t 336 /cefs/tmp_storage >/scratchfs/cc/log/cetmpwatch/rmfile
#more /scratchfs/cc/log/cetmpwatch/rmfile |grep removing|awk '{system ("stat "$3)}'>>/scratchfs/cc/log/cetmpwatch/out.$surfix
#/usr/sbin/tmpwatch   -umc -v -d 336 /cefs/tmp_storage 1>>/scratchfs/cc/log/cetmpwatch/out.$surfix 2>>/scratchfs/cc/log/cetmpwatch/err.$surfix
#et=`date`
#echo "Ending at:$et" >>/scratchfs/cc/log/cetmpwatch/out.$surfix
